<?php
require('setting.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>authorization</title>
  
</head>
<style>
    body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}
body.night-mode{
  background-color: #333333;
}

.container {
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.container.night-mode{
  background-color: #333333;
}
h1 {
  font-size: 2.5em;
  color: #333;
}
h1.night-mode{
  color: #666;
}
p {
  font-size: 1.2em;
  color: #666;
}

.authorization-plans {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}
.authorization-plans.night-mode{
  background-color: #333333;
  color: #fff;
}
.plan {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  width: 28%;
}
.plan.night-mode{
  background-color: #333333;
}
.plan h2 {
  font-size: 1.8em;
  color: #222;
}

.price {
  font-size: 1.5em;
  color: #ff6347;
  margin: 10px 0;
}

.features {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.features li {
  font-size: 1em;
  color: #333;
  margin: 5px 0;
}

.btn {
  background-color: #5cb85c;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 10px;
}

.btn:hover {
  background-color: #4cae4c;
}
li.night-mode{
  color: #666;
}
</style>
<body>
  <div class="container">
    <h1>The program is not authorized</h1>
    <p>For the sake of unnecessary trouble, as well as some villains, we had to introduce this mechanic. Of course, you don't need to worry, the program is still free. You can go to the official website to authorize it for free! Of course, if you have spare money, you can also sponsor us, thank you for your support! -Xi</p>
    <h3>Your quasi-station code: <?php echo $website_array['quascode']?></h3>
    <div class="authorization-plans">
      <div class="plan">
        <h2>The First-generation perpetual License</h2>
        <p class="price">￥0</p>
        <ul class="features">
          <li>A one-time license for perpetual use</li>
          <li>The network disk generation</li>
          <li>There will be no restrictions after authorization</li>
        </ul>
        <button id="authit" class="btn">Authorize it!</button>
      </div>

      <div class="plan">
        <h2>The Second-generation perpetual license</h2>
        <p class="price">￥0</p>
        <ul class="features">
          <li>The same benefits as the first generation license</li>
          <li>The second-generation authorization certificate cannot be used for the first-generation</li>
        </ul>
        <button  id="authit" class="btn">Authorize it!</button>
      </div>

      <div class="plan">
        <h2>Sponsor us-Thank you for your public welfare</h2>
        <p class="price">￥...</p>
        <ul class="features">
          <li>Sponsor us for a meal</li>
          <li>Love life! Every moment counts!The sorrows within me gently settle, like the twilight softly enfolding the hushed woods.</li>
        </ul>
        <button onclick="javascript:window.open('https://www.yhknow.top')" class="btn">Sponsor now</button>
      </div>
    </div>
  </div>
<script>
  document.querySelectorAll('#authit').forEach(button => {
    button.addEventListener('click', () => {
      window.open('https://www.yhknow.top');
    });
  });
</script>
</body>
</html>
<script>
  function isNightTime() {
    const now = new Date();
    const hour = now.getHours();
    return hour >= 23 || hour < 6; 
}
if (isNightTime()) {
  document.body.classList.add("night-mode");
  document.querySelector(".container").classList.add("night-mode");
  document.querySelectorAll(".plan").forEach(function (plan) {
    plan.classList.add("night-mode");
  });
  document.querySelector("h1").classList.add("night-mode");
  document.querySelectorAll("li").forEach(function (li) {
    li.classList.add("night-mode");
  });
}
</script>